package com.ibm.cloud.banking.account.repository;


import com.ibm.cloud.banking.account.entity.AccountInfo;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface IAccountInfoMapper {
    int deleteByPrimaryKey(Long id);

    int insert(AccountInfo record);

    int insertSelective(AccountInfo record);

    AccountInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(AccountInfo record);

    int updateByPrimaryKey(AccountInfo record);

    List<AccountInfo> getCustEffectiveAccts(@Param("customerNo") String cutsNo,
                                            @Param("acctCategory") String accountCategory,
                                            @Param("productNo") String productNo,
                                            @Param("accts")List<String> accts);

    void updateBalanceByAcctNo(@Param("accountNo") String accountNo,
                               @Param("transAmount") BigDecimal transAmount);

    AccountInfo getByAccountNo(@Param("accountNo") String accountNo);

    Integer deleteByAccountNo(@Param("accountNo")String accountNo);
}